package com.zmn.oms.zmn.business.interfaces.open;

import com.zmn.oms.common.dto.ResultDTO;
import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.bo.order.OrderBO;
import com.zmn.oms.model.dto.order.open.*;
import com.zmn.oms.model.entity.work.OrderWorkLogChange;
import com.zmn.oms.model.vo.order.open.AvailableTimeslotsVO;
import com.zmn.oms.model.vo.order.open.OrderInfoVO;

import java.util.List;

/**
 * 类描述：订单代理接口类
 *
 * @author liuying
 * @date 2019/02/18 09:53
 */
public interface OpenOrderBService {

    /**
     * 获取预约时间
     *
     * @param availableTimeslotsQuery
     * @return
     */
    List<AvailableTimeslotsVO> queryAvailableTimeslots(AvailableTimeslotsQuery availableTimeslotsQuery) throws OmsBaseException;

    /**
     * 查询订单
     *
     * @param orderQueryDTO
     * @return
     * @throws OmsBaseException
     */
    OrderInfoVO queryOrder(OrderQueryDTO orderQueryDTO) throws OmsBaseException;

    /**
     * 订单查询
     *
     * @param orderQueryDTO
     * @param orderWorkLogChange
     * @return
     * @throws OmsBaseException
     */
    OrderInfoVO queryOrder(OrderQueryDTO orderQueryDTO, OrderWorkLogChange orderWorkLogChange) throws OmsBaseException;

    /**
     * 同步订单数据
     *
     * @param orderWorkLogChange
     * @return
     * @throws OmsBaseException
     */
    ResultDTO pushOrderInfo(OrderWorkLogChange orderWorkLogChange) throws OmsBaseException;

    /**
     * 新单同步
     *
     * @param orderWorkLogChange
     * @throws OmsBaseException
     */
    ResultDTO pushNewOrderInfo(OrderWorkLogChange orderWorkLogChange) throws OmsBaseException;

    /**
     * 创建订单
     *
     * @param createOrderDTO
     * @return
     */
    OrderBO createOrder(CreateOrderDTO createOrderDTO) throws OmsBaseException;

    /**
     * 渠道订单支付
     *
     * @param payOrderDTO
     * @return
     */
    void channelPrepayOrder(PayOrderDTO payOrderDTO) throws Exception;

    /**
     * 取消订单
     *
     * @param cancelOrderDTO
     */
    void cancelOrder(CancelOrderDTO cancelOrderDTO) throws OmsBaseException;

}
